The present invention relates to the field of computer graphics, and in particular to methods and apparatus for assigning attribute values to surfaces of computer graphics models. Many computer graphic images are created by mathematically modeling the interaction of light with a three dimensional scene from a given viewpoint. This process, called rendering, generates a two-dimensional image of the scene from the given viewpoint, and is analogous to taking a photograph of a real-world scene. Animated sequences can be created by rendering a sequence of images of a scene as the scene is gradually changed over time. A great deal of effort has been devoted to making realistic looking rendered images and animations.
Attribute functions can define the values of attributes of surfaces in three-dimensional space. Attribute functions can be evaluated at any point to provide corresponding attribute values at that point. Attributes can include optical properties of a surface, such as color, transparency, reflectivity, and refractivity. Attributes can also include visibility or occlusion information; artistically or procedurally generated texture data in one, two, three, or more dimensions; noise functions in one, two, three, or more dimensions, which can be used to procedurally generate or modify other attributes; shadow generation information; forces or attributes used for physics, cloth, fluid, or other types of simulations; animation data, which can be used to specify motion of entities associated with a surface point, such as fur or hair; modeling parameters, such as the density of procedurally generated grass applied to a model of a landscape; illumination information, which specifies the amount and direction of light on the surface point from other portions of the scene; and rendering information, such as ray tracing path information or radiosity rendering information.
Texture mapping is one approach for assigning attribute values to surfaces. Texture mapping “wraps” or applies a one, two, three, or more dimensional data set, such as an image, around the surface of an object. Texture mapping is widely used to give computer models a more realistic-looking appearance. One problem with texture mapping is it is often difficult to wrap or apply a flat, two-dimensional image to a three-dimensional surface. Many three-dimensional surfaces are not developable, which means they cannot be unrolled and flattened onto a plane without tearing, wrinkling, stretching, or otherwise distorting. It is difficult for an artist creating a two dimensional image to be texture-mapped onto a non-developable surface to compensate for this to create a continuous and distortion-free texture on the surface.
Additionally, texture mapping often relies on the surface having its own global coordinate system, such as a UV coordinate system in the plane of the surface. However, many types of complex surfaces do not have a global surface coordinate system. For these surfaces, there is no coordinate system within or on the surface itself that can define the position of any surface point as a set of numerical values. Examples of these types of surfaces include subdivision surfaces, implicit surfaces, and fractal surfaces.
Because of the limitations of texture mapping, projection paint techniques are used to apply attributes instead of texture mapping. Projection paint initially defines one or more different camera views of an object. Artists paint images of the desired attributes in the camera views. These painted images and their associated camera view information are then stored. During rendering from any viewpoint, the images of the painted attributes are projected from their associated camera views on to the objects to determine the attribute values. Painted images can be blended, feathered, or otherwise processed using image processing techniques to prevent visible seams and gaps in the attribute values. Depth maps may be used to resolve ambiguities when projecting painted images on non-convex surfaces.
Although projection paint techniques give artists more flexibility in assigning attribute values, they still have to compensate for some distortion. Distortion will occur when the curvature of the surface differs from that of the plane used to paint attribute values. If the surface curves towards or away from the plane of the paint surface, the attribute values may appear distorted when the surface is viewed from a different angle, due the way that the projection function transfers attribute values from the painted image back to the surface.
It is therefore desirable for improved projection paint systems and methods to give artists more control over the application of attribute values to surfaces. It is also desirable for systems and methods to help minimize distortion in projection paint due to surface curvature and edges.